<?php

/**
 * This is the model class for table "jumlahkasuskekerasanbentuk".
 *
 * The followings are the available columns in table 'jumlahkasuskekerasanbentuk':
 * @property integer $jkkb_id
 * @property string $jkkb_bulan
 * @property integer $jkkb_kasus
 * @property integer $jkkb_fisik
 * @property integer $jkkb_psikis
 * @property integer $jkkb_seksual
 * @property integer $jkkb_ekonomi
 * @property integer $jkkb_tahun
 */
class Jumlahkasuskekerasanbentuk extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Jumlahkasuskekerasanbentuk the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'jumlahkasuskekerasanbentuk';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('jkkb_kasus, jkkb_fisik, jkkb_psikis, jkkb_seksual, jkkb_ekonomi, jkkb_tahun', 'numerical', 'integerOnly'=>true),
			array('jkkb_bulan', 'length', 'max'=>45),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('jkkb_id, jkkb_bulan, jkkb_kasus, jkkb_fisik, jkkb_psikis, jkkb_seksual, jkkb_ekonomi, jkkb_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'jkkb_id' => 'Jkkb',
			'jkkb_bulan' => 'Jkkb Bulan',
			'jkkb_kasus' => 'Jkkb Kasus',
			'jkkb_fisik' => 'Jkkb Fisik',
			'jkkb_psikis' => 'Jkkb Psikis',
			'jkkb_seksual' => 'Jkkb Seksual',
			'jkkb_ekonomi' => 'Jkkb Ekonomi',
			'jkkb_tahun' => 'Jkkb Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('jkkb_id',$this->jkkb_id);
		$criteria->compare('jkkb_bulan',$this->jkkb_bulan,true);
		$criteria->compare('jkkb_kasus',$this->jkkb_kasus);
		$criteria->compare('jkkb_fisik',$this->jkkb_fisik);
		$criteria->compare('jkkb_psikis',$this->jkkb_psikis);
		$criteria->compare('jkkb_seksual',$this->jkkb_seksual);
		$criteria->compare('jkkb_ekonomi',$this->jkkb_ekonomi);
		$criteria->compare('jkkb_tahun',$this->jkkb_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}